home *** CD-ROM | disk | FTP | other *** search
/ Aminet 48 / Aminet 48 (2002)(GTI - Schatztruhe)[!][Apr 2002].iso / Aminet / demo / mag / Gods+Iris-D_12.lha / text / thescene-howtoopenademoscreen < prev    next >
Encoding:
Text File  |  1980-03-22  |  7.7 KB  |  179 lines

  1. discnew.font,8
  2. «s6=166,227,181»
  3. «s7=191,206,254»
  4. «»
  5. «c2»«ac»HOW TO OPEN A DEMOSCREEN«»
  6. «»
  7. «c1»By Krabob/Mankind«»
  8. «»
  9. «as»«c6»A code article about opening a demo screen that works EVERYWHERE
  10. with intuition and cgx.«»
  11. «»
  12. «c7»I'd like to talk to you about a problem that will certainly
  13. creates debates, as this subject is sensitive:
  14. it's about «c6»compatibility of demos, «c7»and most of all on their «c6»starting code.
  15. «c7»Before Going further, I would like to thank «c6»DISC «c7»for letting me talk about this
  16. in their mag, and also, I ask you to forgive me for my strange english.«»
  17. «»
  18. Looking at the demos of the last 3 years, I noticed the totality of the
  19. effects was coded for «c6»chunky screen «c7»in a 320 pixel width resolution.
  20. and almost all was using copper hacking, «c6»ChunkyToPlanar, «c7»and system
  21. disabling. Each of these three technique was known for years,
  22. and was found and taught by old coders with an a500 coding culture.
  23. It was not so bad,as it worked, and an effort was made to be 68060 
  24. and a4000 compatible too.«»
  25. «»
  26. But notice this: when on A500, system disabling and copper hacking
  27. was a necessity, on a1200 or a4000 with at least 68030 it is not:
  28. «c6»Sytem disabling «c7»doesn't give more speed (or just a little!), 
  29. and copper hacking is useless, since "de facto" all demos are 
  30. coded in Chunky mode!«»
  31. «»
  32. On another hand, more and more people got a «c6»graphic card, «c7»despite 
  33. the death of phase5 and the lameness of DCE.(Obviously, I do :).
  34. And to my mind, there must be a lot of demo coders that wonder
  35. how to code an AGA and CGX compatible demo, but just don't know
  36. how to do it.And how to code «c6»cgx compatible «c7»when you just got AGA?
  37. (for the losts: CGX=cybergraphics,the graphic card driver)«»
  38. «»
  39. A lot of solution are available, but some are more interesting for 
  40. sceners, to my mind:«»
  41. «»
  42.  «c6»- using rtgmaster.library and the rtg package.
  43. «c7»nice, as you can provide your c2p for aga or use CGX.
  44. but this is something more to install, and that lib
  45. doesn't do much at last.As a demo coder, you certainly
  46. want to supervise what happen when the screen is drawn!«»
  47. «»
  48.  «c6»- using picasso.library and the picasso stuffs.
  49. «c7»again more nice ! the only problem is that
  50. this drivers are not available for all cards!
  51. most of all, cgx is emuled by picasso,so...«»
  52.  «c6»- using intuition, cybergraphics.library and 
  53. graphics.library/WritePixelArray8 «c7»to draw the screen.
  54. Boarggh... Both WritePixelArray8 and WriteChunkyPixel are
  55. lame to draw a whole screen like we do with a C2P.
  56. these functions are to my mind, only to be used with windows,
  57. (patched or not.) PPC user should never use this particularly.«»
  58. «»
  59.  «c6»- using intuition, cybergraphics.library,Kalm's C2P or a copy pass.
  60. «c7»It's the better thing possible to my mind:
  61. if we have AGA, we have an intuition screen with the best C2P
  62. possible, so: aga is fast.
  63. if we have CGX, we get a pointer on the card's "chip memory"
  64. and we only do Our copy pass (or direct rendering).
  65. note that «c6»fast double buffering is always possible with the both,
  66. «c7»by using intuition functions.«»
  67. «»
  68. Why not letting the system open, by the way: «c6»Amiga Multitasking «c7»is
  69. something powerful, you know ?«»
  70. «»
  71. The problem with that cgx technics is that most amiga coders still 
  72. have «c6»no graphic cards, «c7»and can't test their codes for cgx.«»
  73. «»
  74. If anyone is interrested, (and if noone is interested, it's the same:-)
  75. I will code (when I'll found the time) a Both AGA and CGX compatible
  76. version of the example you can found on the beloved site «c6»"Amycoders"
  77. (http://come.to/amiga/ nowadays) 
  78. «c7»this source is called «c6»"startup source for chunky display" «c7»and was
  79. coded by Merko.
  80. It's already a great part of code: It opens an
  81. intuition screen under AGA, and let the use of our dear M.kalm's C2P,
  82. with intuition triple buffer, all that written cent per cent Asm 68K!«»
  83. «»
  84. To work with CGX, just some more lines are needed.
  85. with that kind of "certified" screen opening routine, every coder,
  86. even those with no graphic cards, will be able to make clean and powerful
  87. compatible demos.«»
  88. «»
  89. To illustrate my thought, Here is some example from different generations of 
  90. starting code: «»
  91. «»
  92. «al» an «c6»A500 «c7»trackdisk demos:«»
  93.     - Shut and forget all that fucking lame slow amigaOS1.3.«»
  94.     - Open a ECS screen by hacking the copper list in order to code "Fakes"!«»
  95.     - Run the demo with a ugly 68000 only compatible code.«»
  96.     - Draw the screen with blitter/copper and whatever.«»
  97.     - Refresh the screen with copper hacks also.«»
  98.     - crash if it had to quit.«»
  99. «»
  100.  an «c6»A1200 «c7»demo nowaday (with 030-060):«»
  101.     - Shut all that fast,beautiful and powerful amigaOS3.x.(?)«»
  102.     - Open an AGA screen by hacking the copper,to code... Chunky effects(?)«»
  103.     - Run the demo with a good compatible 680X0 code.«»
  104.     - Draw the screen with a ChunkyToPlanar routine.«»
  105.     - Refresh the double buffered screen with copper hacks.«»
  106.     - Return to the system, like if nothing had happened.«»
  107. «»
  108. «as»And now, see what could be done nowaday (and the way to do it):
  109. I noticed the cybergraphics functions to use, and when, because
  110. it's the most important thing to know. See cybergraphics.doc
  111. to find the parameters !
  112. Note that you could use an ASL requester to ask a screen ModeID.
  113. in that case,use cybergraphics.library/IsCyberModeID to find
  114. if it is CGX. 
  115. Note again that cybergraphics.library functions are only used
  116. to find a screen ID, and after the screen opening, to find the Chunky
  117. screen pointer.«»
  118. «al»
  119.     «c6»- Check for cybergraphics.library«»
  120. «»
  121.     «c7»- if this one is present it will run CGX:«»
  122.          - Ask cgx the best screen type ID with:«»
  123.            cybergraphics.library/BestCModeIDTagList«»
  124. «»
  125.     - (else) no cgx libs were found it will run AGA:«»
  126.          - Ask intuition a screen ID (or get a pal or dblpal ID ).«»
  127. «»
  128.     - Open an intuition screen with that screen type using:«»
  129.       intuition.library/OpenScreen«»
  130. «»
  131.     - if we are CGX,get the screen width modulo, pixel format and chunky pointer.«»
  132.        (it is needed for refresh)«»
  133.        cybergraphics.library/LockBitMapTagList«»
  134.        cybergraphics.library/UnLockBitMap«»
  135. «»
  136.     - Run the effects with a good compatible 680X0 code (as always).«»
  137.     - Make the screen refresh:«»
  138.       - if the screen is AGA:«»
  139.          - Draw the screen with a ChunkyToPlanar routine.«»
  140. «»
  141.       - else the screen is CGX:«»
  142.          - Draw the Chunky screen directly on Chunky memory«»
  143.            or with a cpuBlitting pass.«»
  144. «»
  145.     - Refresh the dblbuffer screen with the nice graphics functions «»
  146.       done for that:«»
  147.       graphics.library/ChangeVPBitMap (it need to alloc other things)«»
  148. «»
  149.     - Return to the system, (you could continue to use during the demo).«»
  150. «»
  151. «as»«c7»Anyway, The cybergraphics.library documentation is very clear, and
  152. can be found on aminet. Notice that «c6»LockbitmapTaglist «c7»is safe to be used
  153. to get the screen chunky pointer,if it is done at each frame!
  154. some people only do that at start: it seems to work the same way.«»
  155. «»
  156. I could write about Picasso, but Picasso emulates 
  157. cgx very well, and the schemes is the same.«»
  158. «»
  159. In conclusion,here is a little «c6»list of demo aga&cgx compatible
  160. demos «c7»I found (I continue to search, don't hesitate to contact me!):
  161. PPC demo are noticed. This list is NOT exhaustive.«»
  162. «»
  163.  «c6»-Dreamscape Disorder  by Logic Probe«»
  164.  -BangCock by Embassy«»
  165.  -Delta by Embassy«»
  166.  -MysterTremor by Embassy«»
  167.  -EuskalParty8 Invitation  by Mankind«»
  168.  -Bastardemon Intro by Mankind.«»
  169.  -all Mankind PPC demos.«»
  170.  -GenderBender by venusart (68K/PPC)«»
  171. «»
  172.  «c7»- It appears that a non-spreaded version of "killer/cncd" is cgx.(scoop!)«»
  173.  - I will myself adapt NewWorldChild and ScrapsOfbeing to work on CGX.«»
  174. «»
  175. «c6»Please notice that this article actually was written for D.I.S.C. #11, but
  176. due to some mistakes we forget to include it. Apologize to Krabob!«»
  177. «»  
  178. «e»
  179.